import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Gas here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Gas extends Obstaculos
{
    /**
     * Act - do whatever the Gas wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
     World mundo=getWorld();
    public void act() 
    {
       if(Greenfoot.isKeyDown("a"))
        super.mueveIzq();
        checaLimite();   
    }
    public void checaLimite()
    {
        if(getX()==0)
            getWorld().removeObject(this);
    }   
    
}
